#pragma once

#include "../../SGD Wrappers/SGD_Geometry.h"
#include "Flyweight.h"

class Particle
{
private:
	float fLifeEnd;
	float fLife;
	float fRotation;
	float fColorA;
	float fColorR;
	float fColorG;
	float fColorB;
	float fColorChangeA;
	float fColorChangeR;
	float fColorChangeG;
	float fColorChangeB;
	float fScale;
	float fScaleChange;
	float fSpeed;
	float fSpeedChange;
	SGD::Vector acceleration;
	SGD::Vector velocity;
	SGD::Point position;

public:
	Particle();
	~Particle();

	// Accessors
	float GetLifeEnd();
	float GetLife();
	float GetRotation();
	float GetColorA();
	float GetColorR();
	float GetColorG();
	float GetColorB();
	float GetColorChangeA();
	float GetColorChangeR();
	float GetColorChangeG();
	float GetColorChangeB();
	float GetScale();
	float GetScaleChange();
	float GetSpeed();
	float GetSpeedChange();
	SGD::Vector GetAcceleration();
	SGD::Vector GetVelocity();
	SGD::Point GetPosition();

	// Mutators
	void SetLifeEnd(float life);
	void SetLife(float life);
	void SetRotation(float rotation);
	void SetColorA(float color);
	void SetColorR(float color);
	void SetColorG(float color);
	void SetColorB(float color);
	void SetColorChangeA(float color);
	void SetColorChangeR(float color);
	void SetColorChangeG(float color);
	void SetColorChangeB(float color);
	void SetScale(float scale);
	void SetScaleChange(float scale);
	void SetSpeed(float speed);
	void SetSpeedChange(float speed);
	void SetAcceleration(SGD::Vector v);
	void SetVelocity(SGD::Vector v);
	void SetPosition(SGD::Point p);

	void Reset(Flyweight f);
	bool Update(Flyweight f, float dt);
	void Render(Flyweight f);
};

